<?php
	include_once("../DTO/taiKhoanDTO.php");
    include_once("../BUS/taiKhoanBUS.php");
?>
<div id="logo">
	<img src="../img/LOGO.jpg" width="189" height="125" /> 
</div>
	<div id="login">
		<?php
            if(isset($_SESSION["id"]))
            {
                $taikhoan = new TaiKhoanBUS();
                $TenDangNhap = $taikhoan->LayTenDangNhap();
                for($i=0; $i<count($TenDangNhap);$i++)
                {
                    echo 'Xin chào, <b>' .$TenDangNhap[$i]->tenDangNhap. '</b>';
                }
				?>
                <br />
                <a href="../pages/xlDangXuat.php">Đăng Xuất</a>
                <?php
            }
            else
            {
                ?>
					<form action="../pages/xlDangNhap.php" method="post" name="frmLogin" id="frmLogin"  onsubmit="return checkLogin()">
                    <div id="Login_input">
                        <table border="0">
                            <tr>
                                <td>USERNAME</td>
                                <td><input type="text" name="txtUser" id="txtUser" maxlength="16" /></td>
                            </tr>
                            <tr>
                                <td>PASSWORD</td>
                                <td><input type="password" name="txtPass" id="txtPass" maxlength="20" /></td>
                            </tr>
                        </table>
                    </div>
                    <div id="login_buts">
                        <a href="../pages/index.php?act=2">Đăng kí |</a>
                        <a href="../pages/index.php?act=3">Quên mật khẩu?</a>
                        <input type="submit" name="Submit" value="Đăng nhập"/>
                    </div>
                </form>
				<?php
            }
        ?>             
    </div>
<div id="slogan">
 
</div>

		